module chapter2;

namespace section1{ // Assignment statements

    void swapAB(int &a, int &b) { // Swap the values of A and B
        int tmp = a;// Set an intermediate variable
        a = b; // Assign a to the value of b
        b = tmp; // Assign b to the value of tmp(value of a)
    }

    int threeNumPlus(int a, int b, int c){
        /// @return a+b+c
        return a+b+c;
    }

    double buyBook(double money, double price){
        /**
         Problem prototype: Xiao Ming has x yuan (money),
         he wants to buy a book with a price of y (price ginseng),
         and now the book is 20% off,
         ask Xiao Ming how much money is left (keep 2 as a decimal)

         @return money-price*0.8
          */

        return money-price*0.8;
    }

}
